package com.yfp.operation.mapper;

import com.yfp.common.datascope.annotation.DataScope;
import com.yfp.operation.domain.LotteryRecords;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yfp.operation.domain.dto.LotteryListDTO;
import com.yfp.operation.domain.dto.MarketingDTO;
import com.yfp.operation.domain.dto.MarketingNoActivityDTO;
import com.yfp.operation.domain.vo.LotteryListVO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
* @author admin
* @description 针对表【lottery_records(抽奖主表)】的数据库操作Mapper
* @createDate 2024-12-30 10:00:06
* @Entity domain.com.yfp.operation.LotteryRecords
*/
public interface LotteryRecordsMapper extends BaseMapper<LotteryRecords> {

    /**
     * 新增抽奖活动
     * @param lotteryRecords
     */
    void addLottery(LotteryRecords lotteryRecords);

    /**
     * 抽奖活动列表
     * @param lotteryListDTO
     * @return
     */
    @DataScope(deptAlias = "lr")
    List<LotteryListVO> lotteryList(LotteryListDTO lotteryListDTO);

    /**
     * 修改抽奖活动
     * @param lotteryRecords
     */
    void updateLottery(LotteryRecords lotteryRecords);

    /**
     * 根据状态获取数据
     * @param status
     * @return
     */
    List<LotteryRecords> getByStatus(Integer status);

    /**
     * 批量修改状态
     * @param lrIds
     * @param status
     */
    void updateStatus(@Param("lrIds") List<Long> lrIds, @Param("status") Long status);

    /**
     * banner关联活动列表
     * @param activityDTO
     * @return
     */
    List<MarketingDTO> activityList(MarketingNoActivityDTO activityDTO);
}




